﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"CodeBehind="ListFileUpload.aspx.cs" Inherits="ADC.Web.Admin.ListFileUpload" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderData" runat="server">

    <div class="content-outer">
      <div class="content-inner">
        <div class="title_border_nopadd">
                <h1>
                    <asp:Label ID="lblHeader" runat="server" Text="">List Uploaded Images</asp:Label></h1>
                <div class="dash-sub-menu">
                </div>
        </div>
                                                                                                      <div>
        <div style="padding-top: 20px;">
            <asp:GridView ID="GridViewSlide" AutoGenerateColumns="false" runat="server" EnableModelValidation="True"
                HeaderStyle-CssClass="gridview-header" CssClass="gridview" PagerStyle-CssClass="pgr"
                AlternatingRowStyle-CssClass="alt" 
                OnRowEditing="GridViewSlide_RowEditing" 
                onrowdeleting="GridViewSlide_RowDeleting">
                <Columns>
                    <asp:TemplateField Visible="false">
                        <ItemTemplate>
                            <asp:Label Visible="false" ID="lblSlideID" runat="server" Text='<%#Eval("FileID") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Title" ItemStyle-CssClass="gridview-item">
                        <ItemTemplate>
                            <label>
                                <%#Eval("Title")%>
                            </label>
                        </ItemTemplate>
                        <ItemStyle Width="180px" />
                    </asp:TemplateField> 
                     <asp:TemplateField HeaderText="Slide" ItemStyle-CssClass="gridview-item">
                        <ItemTemplate>
                                <asp:Label runat="server" Text='<%# Bind("FilePath") %>' Visible="false" ID="lblImagePath"></asp:Label>
                
                            <asp:Image ImageUrl='<%# Bind("FilePath") %>' Width="200px" Height="100px" ID="imagePath" runat="server" />
                        </ItemTemplate>
                        <ItemStyle Width="250px" />
                    </asp:TemplateField>    
                              
                      <asp:TemplateField HeaderText="Link" ItemStyle-CssClass="gridview-item">
                         <ItemTemplate>
                            <label>
                                <a href="<%#Eval("Link")%>" target="_blank"><%#Eval("Link")%></a>
                            </label>
                        </ItemTemplate>
                        <ItemStyle Width="150px" />
                    </asp:TemplateField>
                             
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton ID="ButtonEdit" CommandName="Edit" runat="server" Text="Update" BorderStyle="None" />
                            <asp:LinkButton ID="Button1" CommandName="Delete" runat="server"  OnClientClick="return confirm('Bạn có chắc là muốn xóa?');" Text="Delete" />                             
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </div>

     <div class="customize">
          <ul>
              <li><span>
                  <asp:LinkButton CssClass="button" ID="btnAdd" Text="Upload more" 
                  runat="server" onclick="btnAdd_Click"></asp:LinkButton>
              </span></li>
          </ul>
          <asp:Label ID="lblErrorMessage" Visible="false" CssClass="error" runat="server" Text="Label"></asp:Label>
      </div>

    </div>
   </div>
</asp:Content>
